Add a destroy implementation in order to set priv->cell_view to NULL
authorMatthias Clasen <maclas@gmx.de>
Tue, 24 Feb 2004 00:07:15 +0000 (00:07 +0000)
committerMatthias Clasen <matthiasc@src.gnome.org>
Tue, 24 Feb 2004 00:07:15 +0000 (00:07 +0000)
Tue Feb 24 01:08:27 2004  Matthias Clasen  <maclas@gmx.de>

* gtk/gtkcombobox.c: Add a destroy implementation in order to
set priv->cell_view to NULL before finalize stumbles over the
dangling pointer. This big array of pointers into the widget
tree in GtkComboBoxPrivate is really fragile and should be
cleaned up.

ChangeLog
ChangeLog.pre-2-10
ChangeLog.pre-2-4
ChangeLog.pre-2-6
ChangeLog.pre-2-8
gtk/gtkcombobox.c

index 9d0f61c6aab67d8fede87219657de73a208e2e3b..395e6b3d057551b44afdbe62b6a2b403e945149a 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+Tue Feb 24 01:08:27 2004  Matthias Clasen  <maclas@gmx.de>
+
+       * gtk/gtkcombobox.c: Add a destroy implementation in order to
+       set priv->cell_view to NULL before finalize stumbles over the 
+       dangling pointer. This big array of pointers into the widget 
+       tree in GtkComboBoxPrivate is really fragile and should be
+       cleaned up.
+
 Mon Feb 23 17:52:43 2004  Jonathan Blandford  <jrb@gnome.org>
 
        * gtk/gtkfilechooserdefault.c (main_paned_create): use a size
index 9d0f61c6aab67d8fede87219657de73a208e2e3b..395e6b3d057551b44afdbe62b6a2b403e945149a 100644 (file)
@@ -1,3 +1,11 @@
+Tue Feb 24 01:08:27 2004  Matthias Clasen  <maclas@gmx.de>
+
+       * gtk/gtkcombobox.c: Add a destroy implementation in order to
+       set priv->cell_view to NULL before finalize stumbles over the 
+       dangling pointer. This big array of pointers into the widget 
+       tree in GtkComboBoxPrivate is really fragile and should be
+       cleaned up.
+
 Mon Feb 23 17:52:43 2004  Jonathan Blandford  <jrb@gnome.org>
 
        * gtk/gtkfilechooserdefault.c (main_paned_create): use a size
index 9d0f61c6aab67d8fede87219657de73a208e2e3b..395e6b3d057551b44afdbe62b6a2b403e945149a 100644 (file)
@@ -1,3 +1,11 @@
+Tue Feb 24 01:08:27 2004  Matthias Clasen  <maclas@gmx.de>
+
+       * gtk/gtkcombobox.c: Add a destroy implementation in order to
+       set priv->cell_view to NULL before finalize stumbles over the 
+       dangling pointer. This big array of pointers into the widget 
+       tree in GtkComboBoxPrivate is really fragile and should be
+       cleaned up.
+
 Mon Feb 23 17:52:43 2004  Jonathan Blandford  <jrb@gnome.org>
 
        * gtk/gtkfilechooserdefault.c (main_paned_create): use a size
index 9d0f61c6aab67d8fede87219657de73a208e2e3b..395e6b3d057551b44afdbe62b6a2b403e945149a 100644 (file)
@@ -1,3 +1,11 @@
+Tue Feb 24 01:08:27 2004  Matthias Clasen  <maclas@gmx.de>
+
+       * gtk/gtkcombobox.c: Add a destroy implementation in order to
+       set priv->cell_view to NULL before finalize stumbles over the 
+       dangling pointer. This big array of pointers into the widget 
+       tree in GtkComboBoxPrivate is really fragile and should be
+       cleaned up.
+
 Mon Feb 23 17:52:43 2004  Jonathan Blandford  <jrb@gnome.org>
 
        * gtk/gtkfilechooserdefault.c (main_paned_create): use a size
index 9d0f61c6aab67d8fede87219657de73a208e2e3b..395e6b3d057551b44afdbe62b6a2b403e945149a 100644 (file)
@@ -1,3 +1,11 @@
+Tue Feb 24 01:08:27 2004  Matthias Clasen  <maclas@gmx.de>
+
+       * gtk/gtkcombobox.c: Add a destroy implementation in order to
+       set priv->cell_view to NULL before finalize stumbles over the 
+       dangling pointer. This big array of pointers into the widget 
+       tree in GtkComboBoxPrivate is really fragile and should be
+       cleaned up.
+
 Mon Feb 23 17:52:43 2004  Jonathan Blandford  <jrb@gnome.org>
 
        * gtk/gtkfilechooserdefault.c (main_paned_create): use a size
index 755159c6db8c343d9c927ea6b37ead4b8f751730..2a9dcec232f4b1c14ab19102962c6751ed1e88d5 100644 (file)
@@ -127,6 +127,8 @@ static guint combo_box_signals[LAST_SIGNAL] = {0,};
 static void     gtk_combo_box_class_init           (GtkComboBoxClass *klass);
 static void     gtk_combo_box_cell_layout_init     (GtkCellLayoutIface *iface);
 static void     gtk_combo_box_init                 (GtkComboBox      *combo_box);
+static void     gtk_combo_box_finalize             (GObject          *object);
+static void     gtk_combo_box_destroy              (GtkObject        *object);
 
 static void     gtk_combo_box_set_property         (GObject         *object,
                                                     guint            prop_id,
@@ -136,7 +138,6 @@ static void     gtk_combo_box_get_property         (GObject         *object,
                                                     guint            prop_id,
                                                     GValue          *value,
                                                     GParamSpec      *spec);
-static void     gtk_combo_box_finalize             (GObject          *object);
 
 static void     gtk_combo_box_style_set            (GtkWidget       *widget,
                                                     GtkStyle        *previous_style,
@@ -304,6 +305,7 @@ gtk_combo_box_class_init (GtkComboBoxClass *klass)
 {
   GObjectClass *object_class;
   GtkBindingSet *binding_set;
+  GtkObjectClass *gtk_object_class;
   GtkContainerClass *container_class;
   GtkWidgetClass *widget_class;
 
@@ -320,6 +322,9 @@ gtk_combo_box_class_init (GtkComboBoxClass *klass)
   widget_class->scroll_event = gtk_combo_box_scroll_event;
   widget_class->mnemonic_activate = gtk_combo_box_mnemonic_activate;
 
+  gtk_object_class = (GtkObjectClass *)klass;
+  gtk_object_class->destroy = gtk_combo_box_destroy;
+
   object_class = (GObjectClass *)klass;
   object_class->finalize = gtk_combo_box_finalize;
   object_class->set_property = gtk_combo_box_set_property;
@@ -2932,6 +2937,15 @@ gtk_combo_box_mnemonic_activate (GtkWidget *widget,
   return TRUE;
 }
 
+static void
+gtk_combo_box_destroy (GtkObject *object)
+{
+  GtkComboBox *combo_box = GTK_COMBO_BOX (object);
+
+  GTK_OBJECT_CLASS (parent_class)->destroy (object);
+
+  combo_box->priv->cell_view = NULL;
+}
 
 static void
 gtk_combo_box_finalize (GObject *object)